export default {
  bind(el, binding) {
    const fn = binding.value;
    const input = el.querySelector('input');
    input.addEventListener('change', ()=>{
      if(typeof(fn) == 'function') {
        fn();
      }
    })
    input.addEventListener('keydown', (ev)=>{
      if(eval.keyCode == 13) {
        if(typeof(fn) == 'function') {
          fn();
        }
      }
    })
  }
}